import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";
import "./ui-interactions.css";
import { viewport } from "./viewport";
import { SocketProvider } from "../context/SocketContext";

const geistSans = Geist({
  variable: "--font-geist-sans",
  subsets: ["latin"],
});

const geistMono = Geist_Mono({
  variable: "--font-geist-mono",
  subsets: ["latin"],
});

export const metadata: Metadata = {
  title: "主题咖乐园 - 移动端应用",
  description: "主题咖乐园移动端应用，提供精彩活动、美食、娱乐等服务",
  appleWebApp: {
    capable: true,
    statusBarStyle: "default",
    title: "主题咖乐园",
  },
  formatDetection: {
    telephone: true,
  },
};

// 导出视口配置
export { viewport };

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html lang="zh-CN">
      <body className={`${geistSans.variable} ${geistMono.variable}`}>
        <SocketProvider>
          {children}
        </SocketProvider>
      </body>
    </html>
  );
}
